package cn.iocoder.yudao.module.member.user.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema(description = "用户 APP - 微信小程序手机登录 Request VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AppAuthWeixinMiniAppLoginReqVO {

    @Schema(description = "手机 code，小程序通过 wx.getPhoneNumber 方法获得", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
    @NotEmpty(message = "手机 code 不能为空")
    private String phoneCode;

    @Schema(description = "登录 code，小程序通过 wx.login 方法获得", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
    @NotEmpty(message = "登录 code 不能为空")
    private String loginCode;

    @Schema(description = "state 在 OAuth 的流程中的主要作用就是保证请求完整性，防止 CSRF 风险，可随机生成字符串，如 UUID", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
    @NotEmpty(message = "state 不能为空") // FIXME 说明
    private String state;

    @Schema(description = "邀请人引荐码", example = "82403003")
    private String inviteCode;

}
